package com.whale.kernel.service.interceptors.log;

import java.lang.reflect.Method;
import java.util.Arrays;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.AfterReturningAdvice;

public class AfterLoggerInterceptor implements AfterReturningAdvice {
	
	private final Logger logger = LoggerFactory.getLogger(getClass());

	public void afterReturning(Object returnObject, Method method, Object[] methodParameters,
			Object targetObject) throws Throwable {	
		logger.info("End method: " + method);
		logger.info("	params: " + Arrays.toString(methodParameters));
		logger.info("	return: " + returnObject);
		logger.info("*********************************************************************");
	}

}
